[3.0] Tell agents the unit suite has to pass on Windows - #9602
Merged
live627 merged 1 commit intoAug 31, 2026
Conversation
An agent working in the Docker environment sees only Linux, so a test that bakes in a POSIX file path looks correct to it right up until somebody on Windows runs the suite. The section names the traps and points at the test that already gets it right. Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a short section to
AGENTS.md, under Verifying a change → Tests, saying that the unit suite is expected to pass on Windows and naming the ways a test quietly stops doing so.This is the documentation half of #9595. The reason it is worth writing down is the asymmetry: an agent verifies its work in the Docker environment, which is Linux, so a test that has baked in a POSIX file path looks correct all the way through review and only fails once somebody on Windows runs the suite. There is nothing in the existing guidance that would stop that happening again, and
AGENTS.mdis read by Copilot, Codex, Cursor and Gemini CLI as well as Claude Code.The section uses #9595 itself as the worked example — the assertion, why
C:\a\cwas the right answer and the test the wrong question — and then lists what to watch for:DIRECTORY_SEPARATOR, the fact that absolute paths are rooted differently,PHP_EOL, and the observation that the best fix is not to spell the path out at all, which is whatLangTestalready does.No code changes.
Issues References (Fixes|Related|Closes)
SapiTestfails on Windows #9595